import qs from 'qs';
import { network } from '@/utils';

import { logisCenter } from '../../../../../config/Apis';

export async function queryBatchCommon(params: any) {
  return network.get(logisCenter.batch_common, { params });
}
export async function queryBatchDetail(params: any) {
  return network.get(logisCenter.batch_detail, { params });
}
export async function queryBatchCount(params: any) {
  return network.get(logisCenter.batch_detailCount, { params });
}

export async function batchDelete(params: any) {
  return network.deleter(logisCenter.batch_remove, { params });
}

export async function checkModifyPhone(params: any) {
  return network.get(logisCenter.batch_checkUpdate, { params });
}

export async function modifyPhone(params: any) {
  return network.put(logisCenter.batch_updatePhone, { data: params });
}

export async function downloadCode(params: any) {
  window.location.href = `${logisCenter.batch_downloadBarcode}?${qs.stringify(params)}`;
}
